@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
  }
}

/* 强制所有文字为白色或浅色 - 确保可读性 */
* {
  color: white !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: white !important;
}

p,
span,
div,
label,
input::placeholder {
  color: #e5e7eb !important;
}

.text-gray-400 {
  color: #d1d5db !important;
}

.text-gray-500 {
  color: #d1d5db !important;
}

.text-gray-600 {
  color: #e5e7eb !important;
}

.text-muted-foreground {
  color: #d1d5db !important;
}

/* 特殊颜色保持 */
.text-blue-400 {
  color: #60a5fa !important;
}

.text-green-400 {
  color: #4ade80 !important;
}

.text-red-400 {
  color: #f87171 !important;
}

.text-yellow-400 {
  color: #facc15 !important;
}

.text-purple-400 {
  color: #c084fc !important;
}

.text-orange-400 {
  color: #fb923c !important;
}

/* 星空背景动画 */
.stars {
  background-image: radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(2px 2px at 160px 30px, rgba(255, 255, 255, 0.7), transparent);
  background-repeat: repeat;
  background-size: 200px 100px;
  animation: zoom 20s infinite;
  opacity: 0.4;
}

@keyframes zoom {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* 毛玻璃效果 */
.glass {
  background: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.glass-light {
  background: rgba(30, 41, 59, 0.9) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

/* 日历比赛时间线可视化 */
.calendar-container {
  position: relative;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  position: relative;
}

.calendar-day {
  position: relative;
  min-height: 100px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px;
  background: rgba(15, 23, 42, 0.6);
  transition: all 0.3s ease;
}

.calendar-day:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.calendar-day.highlighted {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.calendar-day.today {
  border-color: #60a5fa;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

/* 比赛时间线 */
.competition-timeline {
  position: absolute;
  height: 4px;
  border-radius: 2px;
  margin: 1px 0;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.competition-timeline:hover {
  height: 6px;
  box-shadow: 0 0 8px currentColor;
  z-index: 20;
}

.competition-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  border-radius: inherit;
  opacity: 0.7;
}

.competition-timeline::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-50%);
}

/* 跨日期的比赛线条 */
.competition-span {
  position: absolute;
  height: 3px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 15;
}

.competition-span:hover {
  height: 5px;
  box-shadow: 0 0 10px currentColor;
  z-index: 25;
}

/* 动画效果 */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
  }
  50% {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.8);
  }
}

.float-animation {
  animation: float 6s ease-in-out infinite;
}

.glow-animation {
  animation: glow 3s ease-in-out infinite;
}

/* 卡片悬停效果 */
.card-hover {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.2);
}

/* 文字渐变动效 */
.text-gradient-animate {
  background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient 15s ease infinite;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* 平台品牌色 */
.kaggle-color {
  color: #20beff !important;
}
.tianchi-color {
  color: #ff6a00 !important;
}
.devpost-color {
  color: #4a90e2 !important;
}
.google-color {
  color: #4285f4 !important;
}
.microsoft-color {
  color: #00bcf2 !important;
}
.openai-color {
  color: #10a37f !important;
}

/* 滚动条样式 */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* 响应式文字大小 */
@media (max-width: 640px) {
  .text-responsive-xl {
    font-size: 1.5rem;
  }
  .text-responsive-2xl {
    font-size: 1.875rem;
  }
  .text-responsive-4xl {
    font-size: 2.5rem;
  }
}

@media (min-width: 641px) {
  .text-responsive-xl {
    font-size: 1.25rem;
  }
  .text-responsive-2xl {
    font-size: 1.5rem;
  }
  .text-responsive-4xl {
    font-size: 3.75rem;
  }
}

/* 筛选器样式 */
.filter-dropdown {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 团队需求和想法标签 */
.team-need {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
  animation: pulse 2s infinite;
}

.team-idea {
  background: rgba(34, 197, 94, 0.2) !important;
  color: #4ade80 !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

/* 项目卡片样式 */
.project-card {
  background: rgba(15, 23, 42, 0.8) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  transition: all 0.3s ease;
}

.project-card:hover {
  border-color: rgba(59, 130, 246, 0.5) !important;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1);
}

/* 数据集标签样式 */
.dataset-tag {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
}

/* 活动卡片样式 */
.event-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.8)) !important;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* 输入框样式 */
input,
textarea,
select {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

input::placeholder,
textarea::placeholder {
  color: #9ca3af !important;
}

/* 按钮样式 */
button {
  color: white !important;
}

/* 确保所有文字可见 */
.text-foreground {
  color: white !important;
}

.text-muted {
  color: #d1d5db !important;
}
